using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;

using OpenXLive;
using OpenXLive.Forms;
using OpenXLive.Features;
using Microsoft.Xna.Framework.Input;

namespace Meteorite
{
    public class XliveStartFormEx : XLiveStartupForm
    {
        public XliveStartFormEx(XLiveFormManager manager)
            :base(manager)
        {
        }
        public override void LoadContent()
        {
            OpenXLive.Controls.XLiveBackButton btn = new OpenXLive.Controls.XLiveBackButton(this);
            AddControl(btn);
            btn.Click += manager_ExitEvent;
            base.LoadContent();

            HelpButtonClick += manager_HelpEvent;

            btn.Rectangle = new Rectangle(16, 16, btn.Image.Width, btn.Image.Height);
        }
        protected override void HardwareKeyPressed()
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                Close();
        }

        void manager_ExitEvent(object sender, EventArgs e)
        {
            Close();
            Meteorite.AdMgr.SetVisible(true);
        }
        void manager_HelpEvent(object sender, EventArgs e)
        {
            MessageBox.Show("Version: 1.0\nGel Studio\ne-mail blue-1986@hotmail.com\nQQ 284720264", "Meteorite");
        }
    }
}
